<#import "/ftlLibrary/properteisVariable.ftl" as pv/>
<#import "/ftlLibrary/pageBarForVue.ftl" as pageBar/>
<div class="row" id="dataTableApp">
    <!-- 映射列表 -->
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div class="widget flat radius-bordered">
            <div class="widget-header bg-sky theme hidden">
                <span class="widget-caption">线索列表</span>
            </div>
            <div class="widget flat searchCriteria">
                <div class="widget-header bordered-bottom bordered-sky theme-bordered">
                    <div class="widget-buttons">
                        <!-- 业务按钮 begin -->
                        <label class="businessBtns">
                            <!--搜索按钮-->
                            <@hp code="ZZJGGL137744597572394-list_search" />
                            <!--新增按钮-->
                            <@hp code="ZZJGGL137744597572394-list_add" />
                            <!--批量禁用按钮-->
                            <@hp code="ZZJGGL137744597572394-batchForbidden" />
                            <!--批量启用按钮-->
                            <@hp code="ZZJGGL137744597572394-batchStartUse" />
                            <!--批量重置密码按钮-->
                            <@hp code="ZZJGGL137744597572394-batchResetPassword" />
                            <!--导入按钮-->
                            <@hp code="ZZJGGL137744597572394-importData" />
                            <!--导出按钮-->
                            <@hp code="ZZJGGL137744597572394-exportData" />
                        </label>
                        <!-- 业务按钮 end -->
                        <!-- 面板控制按钮 begin -->
                        <a href="#" title="打开关闭检索条件" data-toggle="collapse"><i class="fa red fa-minus"></i></a>
                        <a href="javascript:" title="打开关闭高级检索条件" data-toggle="moreConditions"><i
                                class="fa red fa-search-plus"></i></a>
                        <!--<a href="#" data-toggle="config"><i class="fa red fa-cog"></i></a>-->
                        <!-- 面板控制按钮 end -->
                    </div><!--Widget Buttons-->
                </div><!--Widget Header-->
                <div class="widget-body padding-top-5 padding-bottom-5" style="display: block;">
                    <div class="search_Bar">
                        <form method="POST" id="sysAminUserListConditionForm">
                            <input type="hidden" name="orders">
                            <input type="hidden" name="deptId"  value="-1">
                            <input type="hidden" name="pageSize" value="15">
                            <div class="row">
                                <div class="col-lg-3 col-xs-12 col-sm-6 col-md-6 margin-top-5">
                                    <label>用户名</label>
                                    <input type="text" name="userName">
                                </div>
                                <div class="col-lg-3 col-xs-12 col-sm-6 col-md-6 margin-top-5">
                                    <label>&nbsp;&nbsp;&nbsp;&nbsp;真实名称	</label>
                                    <input type="text" name="realName">
                                </div>
                                <div class="col-lg-3 col-xs-12 col-sm-6 col-md-6 margin-top-5">
                                    <label>&nbsp;&nbsp;&nbsp;&nbsp;是否禁用</label>
                                    <select class="selectpicker" name="isForbidden">
                                        <option value="">全部</option>
                                        <option value="false">禁用</option>
                                        <option value="true">启用</option>
                                    </select>
                                </div>
                                <div class="col-lg-3 col-xs-12 col-sm-6 col-md-6 margin-top-5">
                                    <label>手机号</label>
                                    <input type="text" name="phoneNumber">
                                </div>
                            </div>
                        </form>
                    </div>
                </div><!--Widget Body-->
            </div><!--Widget-->
            <div class="widget-body no-padding">
                <div class="topPagingBar">
                    <@pageBar.VuePageBar pageBeanJSObjName="sysAminUserListPageBean"/>
                </div>
                <!-- 数据表列信息列表 -->
                <table class="table table-hover table-bordered table-striped table-condensed flip-content dataTable ryb-dataTable">
                    <thead>
                    <tr>
                        <th title="选择" class="checkboxColumnTh " fixed-align="left">
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox" class="chkAll">
                                    <span class="text"></span>
                                </label>
                            </div>
                        </th>
                        <th title="属性名"  class="order" columnName="name">序号</th>
                        <th title="姓名" class="order" columnName="realName">姓名</th>
                        <th title="用户名" class="order" columnName="userName">用户名</th>
                        <th title="性别" class="order" columnName="sex">性别</th>
                        <th title="职位" class="order" columnName="post">职位</th>
                        <th title="工号" class="order" columnName="jobNumber">工号</th>
                        <th title="手机号" class="order" columnName="phoneNumber">手机号</th>
                        <th title="邮箱" class="order" columnName="email">邮箱</th>
                        <th title="邮箱" class="order" columnName="name">状态</th>
                        <th style="width: 100px">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="(data, index) in dataList">
                        <td class="checkboxColumnTd">
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox" class="chk" name="id" :value="data.id">
                                    <span class="text"></span>
                                </label>
                            </div>
                        </td>
                        <td v-text="index+1"></td>
                        <td v-text="data.realName"></td>
                        <td v-text="data.userName"></td>
                        <td v-dic="{value:data.sex,items:extend.sex}"></td>
                        <td v-text="data.post"></td>
                        <td v-text="data.jobNumber"></td>
                        <td v-text="data.phoneNumber"></td>
                        <td v-text="data.email"></td>
                        <td>
                            <span style="color:green" v-if="!data.isForbidden">启用</span>
                            <span style="color:red;" v-else>禁用</span>
                        </td>
                        <td>
                            <div class="btn-group">
                                <a class="btn btn-xs shiny " href="javascript:void(0);">设置</a>
                                <a class="btn btn-xs dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);"><i class="fa fa-angle-down"></i></a>
                                <ul class="dropdown-menu">
                                    <li role="menuitem">
                                        <#--<a  href="javascript:" @click="showEditDialog(data.id)"><i class="fa fa-edit"></i> 编辑</a>-->
                                        <@hp code="ZZJGGL137744597572394-list_table_tr_edit" />
                                    </li>
                                    <li role="menuitem"v-if="!data.isForbidden">
                                        <#--<a  href="javascript:" @click="setingUser('disable',data.id,data.userName)" ><i class="fa fa-minus-circle"></i> 禁用</a>-->
                                        <@hp code="ZZJGGL137744597572394-list_table_tr_forbidden" />
                                    </li>
                                    <li role="menuitem" v-if="data.isForbidden || data.isForbidden==undefined|| data.isForbidden==null">
                                        <#--<a  href="javascript:" @click="setingUser('enable',data.id,data.userName)" ><i class="fa  fa-power-off"></i> 启用</a>-->
                                        <@hp code="ZZJGGL137744597572394-list_table_tr_start_use" />
                                    </li>
                                    <li role="menuitem">
                                        <#--<a  href="javascript:" @click="setingUser('resetPassword',data.id,data.userName)"><i class="fa fa-mail-reply-all"></i> 重置密码</a>-->
                                        <@hp code="ZZJGGL137744597572394-list_table_tr_start_resetPassword" />
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <div class="col-lg-12 text-align-center margin-top-10 margin-bottom-10"
                     v-show="dataList.length==0">
                    无数据
                </div>
                <@pageBar.VuePageBar pageBeanJSObjName="sysAminUserListPageBean"/>
            </div>
        </div>
    </div>
</div>
<script src="assets/js/select2/select2.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/custom/client/sysAdminUser/list.js"></script>
<script type="text/javascript">
    //初始化排序功能
    initOrderTable($(".dataTable"), $("[name='orders']"),function(){
        sysAminUserListPageBean.vue.goPage(1);
    });
    //表格自动适应高度
    var winHeight = $(window).height();
    var searchCriteriaHeight = $(".searchCriteria").height();
    $("#dataTable").css({
        overflowY: 'auto',
        maxHeight: parseFloat(winHeight) - parseFloat(searchCriteriaHeight) - 220
    });
</script>